
 <!DOCTYPE HTML>
<html lang="zh-Hans">
<head>
  <meta charset="UTF-8">
  
    <title>PHP危险函数总结(随时补充) | </title>
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
    
    <meta name="author" content="daiker">
    

    
    <meta name="description" content="1. 获取当前文件路径 echo dirname(__FILE__) ; echogetcwd();  2. 获取同目录下的所有文件名称 echo var_dump(glob(&amp;#39;./*&amp;#39;)); system(&amp;quot;ls&amp;quot;)/system(&amp;quot;dir&amp;quot;)/system--&amp;gt;可换成执行系统命令的函数; 3. 读取某个文件的内容 echo file">
<meta name="keywords" content="ctf,Web,php">
<meta property="og:type" content="article">
<meta property="og:title" content="PHP危险函数总结(随时补充)">
<meta property="og:url" content="http://www.daiker.com.cn/2017/07/09/php危险函数总结(随时补充)/index.html">
<meta property="og:site_name">
<meta property="og:description" content="1. 获取当前文件路径 echo dirname(__FILE__) ; echogetcwd();  2. 获取同目录下的所有文件名称 echo var_dump(glob(&amp;#39;./*&amp;#39;)); system(&amp;quot;ls&amp;quot;)/system(&amp;quot;dir&amp;quot;)/system--&amp;gt;可换成执行系统命令的函数; 3. 读取某个文件的内容 echo file">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2018-01-05T09:13:40.252Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="PHP危险函数总结(随时补充)">
<meta name="twitter:description" content="1. 获取当前文件路径 echo dirname(__FILE__) ; echogetcwd();  2. 获取同目录下的所有文件名称 echo var_dump(glob(&amp;#39;./*&amp;#39;)); system(&amp;quot;ls&amp;quot;)/system(&amp;quot;dir&amp;quot;)/system--&amp;gt;可换成执行系统命令的函数; 3. 读取某个文件的内容 echo file">
<meta name="twitter:creator" content="@daikersec">

    
    <link rel="alternative" href="/atom.xml" title="" type="application/atom+xml">
    
    
    <link rel="icon" href="/img/favicon.png">
    
    
    <link rel="apple-touch-icon" href="/img/jacman.jpg">
    <link rel="apple-touch-icon-precomposed" href="/img/jacman.jpg">
    
    <link rel="stylesheet" href="/css/style.css">
</head>

  <body>
    <header>
      
<div>
		
			<div id="imglogo">
				<a href="/"><img src="/img/logo.png" alt="" title=""/></a>
			</div>
			
			<div id="textlogo">
				<h1 class="site-name"><a href="/" title=""></a></h1>
				<h2 class="blog-motto"></h2>
			</div>
			<div class="navbar"><a class="navbutton navmobile" href="#" title="Menu">
			</a></div>
			<nav class="animated">
				<ul>
					<ul>
					 
						<li><a href="/">首页</a></li>
					
						<li><a href="/archives">归档</a></li>
					
						<li><a href="/tags">标签</a></li>
					
						<li><a href="/categories">分类</a></li>
					
					<li>
 					
						<form class="search" action="http://zhannei.baidu.com/cse/search" target="_blank">
							<label>Search</label>
						<input name="s" type="hidden" value= 6197743525332190000 ><input type="text" name="q" size="30" placeholder="Search"><br>
						</form>
					
					</li>
				</ul>
			</nav>			
</div>
    </header>
    <div id="container">
      <div id="main" class="post" itemscope itemprop="blogPost">
  
	<article itemprop="articleBody"> 
		<header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2017/07/09/php危险函数总结(随时补充)/" title="PHP危险函数总结(随时补充)" itemprop="url">PHP危险函数总结(随时补充)</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="daiker" target="_blank" itemprop="author">daiker</a>
		
  <p class="article-time">
    <time datetime="2017-07-09T15:44:34.000Z" itemprop="datePublished"> Published 2017-07-09</time>
    
  </p>
</header>
	<div class="article-content">
		
		<div id="toc" class="toc-article">
			<strong class="toc-title">Contents</strong>
		
			<ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-获取当前文件路径"><span class="toc-number">1.</span> <span class="toc-text"><a href="#1-&#x83B7;&#x53D6;&#x5F53;&#x524D;&#x6587;&#x4EF6;&#x8DEF;&#x5F84;" class="headerlink" title="1. &#x83B7;&#x53D6;&#x5F53;&#x524D;&#x6587;&#x4EF6;&#x8DEF;&#x5F84;"></a>1. &#x83B7;&#x53D6;&#x5F53;&#x524D;&#x6587;&#x4EF6;&#x8DEF;&#x5F84;</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-获取同目录下的所有文件名称"><span class="toc-number">2.</span> <span class="toc-text"><a href="#2-&#x83B7;&#x53D6;&#x540C;&#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x6240;&#x6709;&#x6587;&#x4EF6;&#x540D;&#x79F0;" class="headerlink" title="2. &#x83B7;&#x53D6;&#x540C;&#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x6240;&#x6709;&#x6587;&#x4EF6;&#x540D;&#x79F0;"></a>2. &#x83B7;&#x53D6;&#x540C;&#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x6240;&#x6709;&#x6587;&#x4EF6;&#x540D;&#x79F0;</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-读取某个文件的内容"><span class="toc-number">3.</span> <span class="toc-text"><a href="#3-&#x8BFB;&#x53D6;&#x67D0;&#x4E2A;&#x6587;&#x4EF6;&#x7684;&#x5185;&#x5BB9;" class="headerlink" title="3. &#x8BFB;&#x53D6;&#x67D0;&#x4E2A;&#x6587;&#x4EF6;&#x7684;&#x5185;&#x5BB9;"></a>3. &#x8BFB;&#x53D6;&#x67D0;&#x4E2A;&#x6587;&#x4EF6;&#x7684;&#x5185;&#x5BB9;</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-执行系统命令的函数"><span class="toc-number">4.</span> <span class="toc-text"><a href="#4-&#x6267;&#x884C;&#x7CFB;&#x7EDF;&#x547D;&#x4EE4;&#x7684;&#x51FD;&#x6570;" class="headerlink" title="4. &#x6267;&#x884C;&#x7CFB;&#x7EDF;&#x547D;&#x4EE4;&#x7684;&#x51FD;&#x6570;"></a>4. &#x6267;&#x884C;&#x7CFB;&#x7EDF;&#x547D;&#x4EE4;&#x7684;&#x51FD;&#x6570;</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-执行PHP的函数"><span class="toc-number">5.</span> <span class="toc-text"><a href="#5-&#x6267;&#x884C;PHP&#x7684;&#x51FD;&#x6570;" class="headerlink" title="5. &#x6267;&#x884C;PHP&#x7684;&#x51FD;&#x6570;"></a>5. &#x6267;&#x884C;PHP&#x7684;&#x51FD;&#x6570;</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6-回调函数"><span class="toc-number">6.</span> <span class="toc-text"><a href="#6-&#x56DE;&#x8C03;&#x51FD;&#x6570;" class="headerlink" title="6. &#x56DE;&#x8C03;&#x51FD;&#x6570;"></a>6. &#x56DE;&#x8C03;&#x51FD;&#x6570;</span></a></li></ol>
		
		</div>
		
		<h3 id="1-获取当前文件路径"><a href="#1-获取当前文件路径" class="headerlink" title="1. 获取当前文件路径"></a>1. 获取当前文件路径</h3><ul>
<li>echo <code>dirname(__FILE__)</code> ;</li>
<li>echo<code>getcwd()</code>;</li>
</ul>
<h3 id="2-获取同目录下的所有文件名称"><a href="#2-获取同目录下的所有文件名称" class="headerlink" title="2. 获取同目录下的所有文件名称"></a>2. 获取同目录下的所有文件名称</h3><ul>
<li>echo <code>var_dump(glob(&#39;./*&#39;))</code>;</li>
<li><p><code>system(&quot;ls&quot;)/system(&quot;dir&quot;)/system--&gt;可换成执行系统命令的函数</code>;</p>
<h3 id="3-读取某个文件的内容"><a href="#3-读取某个文件的内容" class="headerlink" title="3. 读取某个文件的内容"></a>3. 读取某个文件的内容</h3></li>
<li><p>echo <code>file_get_contents(&quot;flag.php&quot;)</code>;</p>
</li>
<li>echo <code>fgets(fopen(&quot;flag.php&quot;,&quot;r&quot;))</code>;</li>
<li><code>show_source(&quot;flag.php&quot;)</code>;</li>
<li>echo <code>fread(fopen(&quot;flag.php&quot;,&quot;r&quot;),filesize(&quot;flag.php&quot;))</code>;</li>
<li>echo <code>var_dump(file(&quot;flag.php&quot;))</code>;</li>
<li><code>copy(&quot;flag.php&quot;,&quot;daiker.txt&quot;)</code>;</li>
<li><code>include &#39;php://filter/read=convert.base64-encode/resource=flag.php&#39;</code>;</li>
<li><code>highlight_file(&quot;flag.php&quot;)</code>;</li>
</ul>
<h3 id="4-执行系统命令的函数"><a href="#4-执行系统命令的函数" class="headerlink" title="4. 执行系统命令的函数"></a>4. 执行系统命令的函数</h3><ul>
<li>system</li>
<li>passthru</li>
<li>exec</li>
<li>pcntl_exec</li>
<li>shell_exec</li>
<li></li>
</ul>
<h3 id="5-执行PHP的函数"><a href="#5-执行PHP的函数" class="headerlink" title="5. 执行PHP的函数"></a>5. 执行PHP的函数</h3><ul>
<li>eval(注意，不是函数，不能再回调函数里面使用)</li>
<li>assert</li>
<li>preg_replace</li>
<li>`</li>
</ul>
<h3 id="6-回调函数"><a href="#6-回调函数" class="headerlink" title="6. 回调函数"></a>6. 回调函数</h3><ul>
<li>call_user_func</li>
<li>call_user_func_array</li>
<li>create_function</li>
<li>array_map</li>
</ul>
  
	</div>
		<footer class="article-footer clearfix">
<div class="article-catetags">

<div class="article-categories">
  <span></span>
  <a class="article-category-link" href="/categories/ctf/">ctf</a>
</div>


  <div class="article-tags">
  
  <span></span> <a href="/tags/ctf/">ctf</a><a href="/tags/Web/">Web</a><a href="/tags/php/">php</a>
  </div>

</div>



	<div class="article-share" id="share">
	
	  <div data-url="http://www.daiker.com.cn/2017/07/09/php危险函数总结(随时补充)/" data-title="PHP危险函数总结(随时补充) | " data-tsina="5688081717" class="share clearfix">
	  </div>
	
	</div>


</footer>

   	       
	</article>
	
<nav class="article-nav clearfix">
 
 <div class="prev" >
 <a href="/2017/12/22/php-object-injection/" title="php-object-injection">
  <strong>上一篇：</strong><br/>
  <span>
  php-object-injection</span>
</a>
</div>


<div class="next">
<a href="/2017/05/09/insert 注入/"  title="insert 注入">
 <strong>下一篇：</strong><br/> 
 <span>insert 注入
</span>
</a>
</div>

</nav>

	
<section id="comments" class="comment">
	<div class="ds-thread" data-thread-key="2017/07/09/php危险函数总结(随时补充)/" data-title="PHP危险函数总结(随时补充)" data-url="http://www.daiker.com.cn/2017/07/09/php危险函数总结(随时补充)/"></div>
</section>




</div>  
      <div class="openaside"><a class="navbutton" href="#" title="Show Sidebar"></a></div>

  <div id="toc" class="toc-aside">
  <strong class="toc-title">Contents</strong>
 
 <ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-获取当前文件路径"><span class="toc-number">1.</span> <span class="toc-text"><a href="#1-&#x83B7;&#x53D6;&#x5F53;&#x524D;&#x6587;&#x4EF6;&#x8DEF;&#x5F84;" class="headerlink" title="1. &#x83B7;&#x53D6;&#x5F53;&#x524D;&#x6587;&#x4EF6;&#x8DEF;&#x5F84;"></a>1. &#x83B7;&#x53D6;&#x5F53;&#x524D;&#x6587;&#x4EF6;&#x8DEF;&#x5F84;</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-获取同目录下的所有文件名称"><span class="toc-number">2.</span> <span class="toc-text"><a href="#2-&#x83B7;&#x53D6;&#x540C;&#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x6240;&#x6709;&#x6587;&#x4EF6;&#x540D;&#x79F0;" class="headerlink" title="2. &#x83B7;&#x53D6;&#x540C;&#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x6240;&#x6709;&#x6587;&#x4EF6;&#x540D;&#x79F0;"></a>2. &#x83B7;&#x53D6;&#x540C;&#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x6240;&#x6709;&#x6587;&#x4EF6;&#x540D;&#x79F0;</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-读取某个文件的内容"><span class="toc-number">3.</span> <span class="toc-text"><a href="#3-&#x8BFB;&#x53D6;&#x67D0;&#x4E2A;&#x6587;&#x4EF6;&#x7684;&#x5185;&#x5BB9;" class="headerlink" title="3. &#x8BFB;&#x53D6;&#x67D0;&#x4E2A;&#x6587;&#x4EF6;&#x7684;&#x5185;&#x5BB9;"></a>3. &#x8BFB;&#x53D6;&#x67D0;&#x4E2A;&#x6587;&#x4EF6;&#x7684;&#x5185;&#x5BB9;</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-执行系统命令的函数"><span class="toc-number">4.</span> <span class="toc-text"><a href="#4-&#x6267;&#x884C;&#x7CFB;&#x7EDF;&#x547D;&#x4EE4;&#x7684;&#x51FD;&#x6570;" class="headerlink" title="4. &#x6267;&#x884C;&#x7CFB;&#x7EDF;&#x547D;&#x4EE4;&#x7684;&#x51FD;&#x6570;"></a>4. &#x6267;&#x884C;&#x7CFB;&#x7EDF;&#x547D;&#x4EE4;&#x7684;&#x51FD;&#x6570;</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-执行PHP的函数"><span class="toc-number">5.</span> <span class="toc-text"><a href="#5-&#x6267;&#x884C;PHP&#x7684;&#x51FD;&#x6570;" class="headerlink" title="5. &#x6267;&#x884C;PHP&#x7684;&#x51FD;&#x6570;"></a>5. &#x6267;&#x884C;PHP&#x7684;&#x51FD;&#x6570;</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6-回调函数"><span class="toc-number">6.</span> <span class="toc-text"><a href="#6-&#x56DE;&#x8C03;&#x51FD;&#x6570;" class="headerlink" title="6. &#x56DE;&#x8C03;&#x51FD;&#x6570;"></a>6. &#x56DE;&#x8C03;&#x51FD;&#x6570;</span></a></li></ol>
 
  </div>

<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="Hide Sidebar"></a></div>
<aside class="clearfix">

  
<div class="github-card">
<p class="asidetitle">Github Card</p>
<div class="github-card" data-github="daikersec" data-theme="medium"></div>
<script type="text/javascript" src="//cdn.jsdelivr.net/github-cards/latest/widget.js" ></script>
</div>



  
<div class="categorieslist">
	<p class="asidetitle">Categories</p>
		<ul>
		
		  
			<li><a href="/categories/ctf/" title="ctf">ctf<sup>5</sup></a></li>
		  
		
		  
			<li><a href="/categories/注入/" title="注入">注入<sup>1</sup></a></li>
		  
		
		  
			<li><a href="/categories/渗透测试/" title="渗透测试">渗透测试<sup>1</sup></a></li>
		  
		
		  
			<li><a href="/categories/漏洞研究/" title="漏洞研究">漏洞研究<sup>1</sup></a></li>
		  
		
		</ul>
</div>


  
<div class="tagslist">
	<p class="asidetitle">Tags</p>
		<ul class="clearfix">
		
			
				<li><a href="/tags/Web/" title="Web">Web<sup>8</sup></a></li>
			
		
			
				<li><a href="/tags/ctf/" title="ctf">ctf<sup>6</sup></a></li>
			
		
			
				<li><a href="/tags/hackinglab/" title="hackinglab">hackinglab<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/漏洞研究/" title="漏洞研究">漏洞研究<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/代码审计/" title="代码审计">代码审计<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/php/" title="php">php<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/注入/" title="注入">注入<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/渗透/" title="渗透">渗透<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/提权/" title="提权">提权<sup>1</sup></a></li>
			
		
		</ul>
</div>


  
  <div class="archiveslist">
    <p class="asidetitle"><a href="/archives">Archives</a></p>
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/02/">February 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/12/">December 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/07/">July 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/05/">May 2017</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/04/">April 2017</a><span class="archive-list-count">3</span></li></ul>
  </div>


  <div class="rsspart">
	<a href="/atom.xml" target="_blank" title="rss">RSS</a>
</div>

</aside>
</div>
    </div>
    <footer><div id="footer" >
	
	<div class="line">
		<span></span>
		<div class="author"></div>
	</div>
	
	
	<div class="social-font" class="clearfix">
		
		<a href="http://weibo.com/daikersec" target="_blank" class="icon-weibo" title="微博"></a>
		
		
		<a href="https://github.com/daikersec" target="_blank" class="icon-github" title="github"></a>
		
		
		
		<a href="https://twitter.com/daikersec" target="_blank" class="icon-twitter" title="twitter"></a>
		
		
		
		
		
		
		
		<a href="mailto:daikersec@gmail.com" target="_blank" class="icon-email" title="Email Me"></a>
		
	</div>
			
		

		<p class="copyright">
		Powered by <a href="http://hexo.io" target="_blank" title="hexo">hexo</a> and Theme by <a href="https://github.com/wuchong/jacman" target="_blank" title="Jacman">Jacman</a> © 2018 
		
		<a href="/about" target="_blank" title="daiker">daiker</a>
		
		
		</p>
</div>
</footer>
    <script src="/js/jquery-2.0.3.min.js"></script>
<script src="/js/jquery.imagesloaded.min.js"></script>
<script src="/js/gallery.js"></script>
<script src="/js/jquery.qrcode-0.12.0.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){ 
  $('.navbar').click(function(){
    $('header nav').toggleClass('shownav');
  });
  var myWidth = 0;
  function getSize(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
  };
  var m = $('#main'),
      a = $('#asidepart'),
      c = $('.closeaside'),
      o = $('.openaside');
  c.click(function(){
    a.addClass('fadeOut').css('display', 'none');
    o.css('display', 'block').addClass('fadeIn');
    m.addClass('moveMain');
  });
  o.click(function(){
    o.css('display', 'none').removeClass('beforeFadeIn');
    a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');      
    m.removeClass('moveMain');
  });
  $(window).scroll(function(){
    o.css("top",Math.max(80,260-$(this).scrollTop()));
  });
  
  $(window).resize(function(){
    getSize(); 
    if (myWidth >= 1024) {
      $('header nav').removeClass('shownav');
    }else{
      m.removeClass('moveMain');
      a.css('display', 'block').removeClass('fadeOut');
      o.css('display', 'none');
      
      $('#toc.toc-aside').css('display', 'none');
        
    }
  });
});
</script>

<script type="text/javascript">
$(document).ready(function(){ 
  var ai = $('.article-content>iframe'),
      ae = $('.article-content>embed'),
      t  = $('#toc'),
      ta = $('#toc.toc-aside'),
      o  = $('.openaside'),
      c  = $('.closeaside');
  if(ai.length>0){
    ai.wrap('<div class="video-container" />');
  };
  if(ae.length>0){
   ae.wrap('<div class="video-container" />');
  };
  c.click(function(){
    ta.css('display', 'block').addClass('fadeIn');
  });
  o.click(function(){
    ta.css('display', 'none');
  });
  $(window).scroll(function(){
    ta.css("top",Math.max(140,320-$(this).scrollTop()));
  });
});
</script>


<script type="text/javascript">
$(document).ready(function(){ 
  var $this = $('.share'),
      url = $this.attr('data-url'),
      encodedUrl = encodeURIComponent(url),
      title = $this.attr('data-title'),
      tsina = $this.attr('data-tsina'),
      description = $this.attr('description');
  var html = [
  '<div class="hoverqrcode clearfix"></div>',
  '<a class="overlay" id="qrcode"></a>',
  '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="article-share-facebook" target="_blank" title="Facebook"></a>',
  '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="article-share-twitter" target="_blank" title="Twitter"></a>',
  '<a href="#qrcode" class="article-share-qrcode" title="微信"></a>',
  '<a href="http://widget.renren.com/dialog/share?resourceUrl=' + encodedUrl + '&srcUrl=' + encodedUrl + '&title=' + title +'" class="article-share-renren" target="_blank" title="人人"></a>',
  '<a href="http://service.weibo.com/share/share.php?title='+title+'&url='+encodedUrl +'&ralateUid='+ tsina +'&searchPic=true&style=number' +'" class="article-share-weibo" target="_blank" title="微博"></a>',
  '<span title="Share to"></span>'
  ].join('');
  $this.append(html);

  $('.hoverqrcode').hide();

  var myWidth = 0;
  function updatehoverqrcode(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
    var qrsize = myWidth > 1024 ? 200:100;
    var options = {render: 'image', size: qrsize, fill: '#2ca6cb', text: url, radius: 0.5, quiet: 1};
    var p = $('.article-share-qrcode').position();
    $('.hoverqrcode').empty().css('width', qrsize).css('height', qrsize)
                          .css('left', p.left-qrsize/2+20).css('top', p.top-qrsize-10)
                          .qrcode(options);
  };
  $(window).resize(function(){
    $('.hoverqrcode').hide();
  });
  $('.article-share-qrcode').click(function(){
    updatehoverqrcode();
    $('.hoverqrcode').toggle();
  });
  $('.article-share-qrcode').hover(function(){}, function(){
      $('.hoverqrcode').hide();
  });
});   
</script>



<script type="text/javascript">
  var duoshuoQuery = {short_name:"嘟嘟MD"};
  (function() {
    var ds = document.createElement('script');
    ds.type = 'text/javascript';ds.async = true;
    ds.src = '//static.duoshuo.com/embed.js';
    ds.charset = 'UTF-8';
    (document.getElementsByTagName('head')[0] 
    || document.getElementsByTagName('body')[0]).appendChild(ds);
  })();
</script> 









<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){ 
  $('.article-content').each(function(i){
    $(this).find('img').each(function(){
      if ($(this).parent().hasClass('fancybox')) return;
      var alt = this.alt;
      if (alt) $(this).after('<span class="caption">' + alt + '</span>');
      $(this).wrap('<a href="' + this.src + '" title="' + alt + '" class="fancybox"></a>');
    });
    $(this).find('.fancybox').each(function(){
      $(this).attr('rel', 'article' + i);
    });
  });
  if($.fancybox){
    $('.fancybox').fancybox();
  }
}); 
</script>



<!-- Analytics Begin -->



<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?2a1c7e2856fa901812e41edbfcef616e";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>



<!-- Analytics End -->

<!-- Totop Begin -->

	<div id="totop">
	<a title="Back to Top"><img src="/img/scrollup.png"/></a>
	</div>
	<script src="/js/totop.js"></script>

<!-- Totop End -->

<!-- MathJax Begin -->
<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


<!-- MathJax End -->

<!-- Tiny_search Begin -->

<!-- Tiny_search End -->

  </body>
</html>
